import {
	request
} from '@/utils/request'


//根据id查询活动
export const apiGetActivityById = (id) =>
	request({
		method: 'GET',
		url: `/applet/user/activity/activity/${id}`
	})

//分页查询志愿活动
export const apiGetActivityList1 = (data) =>//这个专门用来显示活动列表
	request({
		method: 'GET',
		// url: `/applet/user/activity/activityPage?activityName=${data.activityName}&pageNo=${data.pageNo}&pageSize=${data.pageSize}`
		url: `/applet/user/activity/activityPage`,
		data
	})
export const apiGetActivityList2 = (data) =>//这个专门用来搜索查询
	request({
		method: 'GET',
		url: `/applet/user/activity/activityPage?activityName=${data.activityName}&pageNo=${data.pageNo}&pageSize=${data.pageSize}`
		// url: `/applet/user/activity/activityPage?pageNo=${data.pageNo}&pageSize=${data.pageSize}`
	})	

//用户报名志愿活动
export const apiVolunteerActivity = (data) =>
	request({
		method: 'POST',
		url: `/applet/user/activity/enrollActivity`,
		data
	})

//我的活动分页查询
export const apiGetMyActivityList = (data) =>
	request({
		method: 'GET',
		url: `/applet/user/activity/myActivityPage?currentPage=${data.currentPage}&pageSize=${data.pageSize}&status=${data.status}`
	})
//轮播图
export const apiGetActivityPhoto = () =>
	request({
		method: 'GET',
		url: `/applet/user/carousel/active`
	})	

//用户取消报名志愿活动
export const apiCancelVolunteerActivity = (id) =>
	request({
		method: 'PUT',
		url: `/applet/user/activity/quitActivity`,
		data: id
	})